﻿/*--------------------------------------------------------------------------------
 * Adaptive Intelligence - Foundation Framework Class Library
 * Version 2.00
 * 
 * File Stream Event Arguments Class
 *		Provides an event arguments implementation for filestream related events.
 *------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------
 * System Imports
 *------------------------------------------------------------------------------*/
using System;
using System.IO;

namespace Adaptive.Foundation
{
    /// <summary>
    /// Provides an event arguments implementation for filestream related events.
    /// </summary>
    /// <remarks>
    /// This is used to notify the caller of a reference to a file stream instance.
    /// </remarks>
    public sealed class FileStreamEventArgs : System.EventArgs
    {
        /*--------------------------------------------------------------------------------
         * Private Member Declarations
         *------------------------------------------------------------------------------*/
        #region Private Member Declarations
        /// <summary>
        /// File stream being referred to.
        /// </summary>
        private FileStream _fileStream;
        #endregion

        /*--------------------------------------------------------------------------------
         * Constructor / Dispose / Destructor Methods
         *------------------------------------------------------------------------------*/
        #region Constructor / Dispose / Destructor Methods
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        /// <value>
        /// This is the default constructor.
        /// </value>
        public FileStreamEventArgs()
        {
            _fileStream = null; 
        }
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        /// <param name="stream">
        /// A <see cref="FileStream"/> instance.
        /// </param>
        public FileStreamEventArgs(FileStream stream)
        {
            _fileStream = stream;
        }
        /// <summary>
        /// Class destructor.
        /// </summary>
        ~FileStreamEventArgs()
        {
            _fileStream = null;
        }
        #endregion

        /*--------------------------------------------------------------------------------
         * Public Properties
         *------------------------------------------------------------------------------*/
        #region Public Properties
        /// <summary>
        /// Gets the reference to the file stream instance.
        /// </summary>
        /// <value>
        /// A <see cref="FileStream"/> instance.
        /// </value>
        public FileStream Stream
        {
            get { return _fileStream; }
        }
        #endregion
    }
}